{{- if .Parent -}}
    {{- $name := trim (.Get "name") " " -}}
    {{- $cookie_value := trim (.Get "cookie-value") " " -}}
    {{- if not (.Parent.Scratch.Get "tabs") -}}
        {{- .Parent.Scratch.Set "tabs" slice -}}
    {{- end -}}
    {{- $.Parent.Scratch.Add "tabs" (dict "name" $name "cookie_value" $cookie_value "content" .Inner) -}}
{{- else -}}
    {{- errorf "Missing surrounding tabset for tab (%s)" .Position -}}
{{- end -}}
